<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "iliketry.prv_members".
 *
 * @property integer $no
 * @property string $name
 * @property string $password
 * @property string $true_name
 * @property string $mpass
 * @property string $salt
 * @property integer $department_no
 * @property string $email
 * @property string $cell
 * @property integer $status
 * @property string $prv
 * @property integer $erased
 * @property string $shenfen
 */
class IPrvMembers extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'iliketry.prv_members';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['mpass', 'salt'], 'required'],
            [['department_no', 'status', 'erased'], 'integer'],
            [['name', 'password', 'true_name'], 'string', 'max' => 255],
            [['mpass', 'email', 'cell'], 'string', 'max' => 50],
            [['salt'], 'string', 'max' => 6],
            [['prv'], 'string', 'max' => 2000],
            [['shenfen'], 'string', 'max' => 18],
            [['name'], 'unique'],
            [['true_name'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'no' => 'ID',
            'name' => '用户名',
            'password' => '密码',
            'true_name' => '真实姓名',
            'mpass' => 'Mpass',
            'salt' => 'Salt',
            'department_no' => 'Department No',
            'email' => 'Email',
            'cell' => 'Cell',
            'status' => 'Status',
            'prv' => 'Prv',
            'erased' => 'Erased',
            'shenfen' => '身份证',
        ];
    }

    /**
     * @inheritdoc
     * @return \services\models\IPrvMembers the active query used by this AR class.
     */
    public static function find()
    {
        return new \services\models\IPrvMembersQuery(get_called_class());
    }
}
